
/**
 *
 */
package com.serviceprovider.business.module.admin.role.services.dao.interfaces;

//~--- non-JDK imports --------------------------------------------------------

import com.serviceprovider.business.module.admin.role.model.Role;
import com.serviceprovider.business.module.common.Page;
import com.serviceprovider.business.module.user.model.impl.User;

//~--- JDK imports ------------------------------------------------------------

import java.io.IOException;
import java.io.InputStream;

import java.sql.SQLException;

import java.util.List;

/**
 * @author mrduongnv@gmail.com
 *
 */
public interface IRoleService {
    public Role getRoleById(int id);

    public Role getRoleByName(String name);

    public Integer getRoleId(String name);

    public List<Role> findAll();

    Page<Role> findAll(int pageNo, int recordSize, String sortColumn, String sortOrder);

    public void insertRole(Role role);

    public void updateRole(Role role);

    public void deleteRolesById(int[] idList);

    public void resetDb(List<InputStream> ins) throws IOException, SQLException;

    public void updateStatus(int id, boolean active);

    public List<Role> getRolesById(List<Integer> roleIdList);

    /**
     * Retrieves from database the corresponding
     * Role for the users in the list.
     */
    public void retrieveRole(List<User> userList);

    /**
     * Retrieves from database the corresponding
     * Role for the user parameter.
     */
    public void retrieveRole(User user);
}



